package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StudentCodeSubmissionsMapper;
import com.ruoyi.system.domain.StudentCodeSubmissions;
import com.ruoyi.system.service.IStudentCodeSubmissionsService;

/**
 * 学生代码提交Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-15
 */
@Service
public class StudentCodeSubmissionsServiceImpl implements IStudentCodeSubmissionsService 
{
    @Autowired
    private StudentCodeSubmissionsMapper studentCodeSubmissionsMapper;

    /**
     * 查询学生代码提交
     * 
     * @param submissionId 学生代码提交主键
     * @return 学生代码提交
     */
    @Override
    public StudentCodeSubmissions selectStudentCodeSubmissionsBySubmissionId(Long submissionId)
    {
        return studentCodeSubmissionsMapper.selectStudentCodeSubmissionsBySubmissionId(submissionId);
    }

    /**
     * 查询学生代码提交列表
     * 
     * @param studentCodeSubmissions 学生代码提交
     * @return 学生代码提交
     */
    @Override
    public List<StudentCodeSubmissions> selectStudentCodeSubmissionsList(StudentCodeSubmissions studentCodeSubmissions)
    {
        return studentCodeSubmissionsMapper.selectStudentCodeSubmissionsList(studentCodeSubmissions);
    }

    /**
     * 新增学生代码提交
     * 
     * @param studentCodeSubmissions 学生代码提交
     * @return 结果
     */
    @Override
    public int insertStudentCodeSubmissions(StudentCodeSubmissions studentCodeSubmissions)
    {
        return studentCodeSubmissionsMapper.insertStudentCodeSubmissions(studentCodeSubmissions);
    }

    /**
     * 修改学生代码提交
     * 
     * @param studentCodeSubmissions 学生代码提交
     * @return 结果
     */
    @Override
    public int updateStudentCodeSubmissions(StudentCodeSubmissions studentCodeSubmissions)
    {
        return studentCodeSubmissionsMapper.updateStudentCodeSubmissions(studentCodeSubmissions);
    }

    /**
     * 批量删除学生代码提交
     * 
     * @param submissionIds 需要删除的学生代码提交主键
     * @return 结果
     */
    @Override
    public int deleteStudentCodeSubmissionsBySubmissionIds(Long[] submissionIds)
    {
        return studentCodeSubmissionsMapper.deleteStudentCodeSubmissionsBySubmissionIds(submissionIds);
    }

    /**
     * 删除学生代码提交信息
     * 
     * @param submissionId 学生代码提交主键
     * @return 结果
     */
    @Override
    public int deleteStudentCodeSubmissionsBySubmissionId(Long submissionId)
    {
        return studentCodeSubmissionsMapper.deleteStudentCodeSubmissionsBySubmissionId(submissionId);
    }
}
